import { createRouter,createWebHistory } from "vue-router";

import Home from '../pages/Home.vue'
import News from '../pages/News.vue'
import About from '../pages/About.vue'
import Detail from "../pages/Detail.vue";

const router = createRouter({
  history:createWebHistory(),
  routes:[
    {
      path:'/home',
      component:Home
    },
    {
      path:'/news',
      component:News,
      children:[
        {
          path:'detail',
          component:Detail
        }
      ]
    },
    {
      path:'/about',
      component:About
    }
  ]
})

export default router;